from datetime import datetime
from typing import List

from pydantic import BaseModel, Field, HttpUrl, validator


class FileDownloadRequest(BaseModel):
    task_id  : str = Field(..., description="飞行任务id")
    resolution : float = Field(..., description="DEM分辨率")
    threshold : float = Field(..., description="高程变化阈值")
    rbgimg_tif_url: HttpUrl = Field(..., description="rbgimg tif文件url")
    realland_tif_url: HttpUrl = Field(..., description="realland tif文件url")
    first_file_urls : List[HttpUrl] = Field(..., description="第一组文件url")
    second_file_urls : List[HttpUrl] = Field(default=None,description="第二组文件url")

class CalculationRequest(BaseModel):
    TaskId  : str = Field(..., description="飞行任务id")
    ImageUrl: HttpUrl = Field(...,  description="图片文件url")
    Rightxy : List = Field(..., description="地图左上角和右下角坐标")
    LatAndLnglist : List = Field(default=None,description="序号和中心坐标lis")



